object Form1: TForm1
  Left = 255
  Top = 284
  Width = 979
  Height = 563
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 112
    Top = 72
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object DBGridEh1: TDBGridEh
    Left = 416
    Top = 168
    Width = 320
    Height = 120
    DataGrouping.GroupLevels = <>
    DataSource = dtsGetDoct
    EditActions = [geaCopyEh, geaSelectAllEh]
    Flat = False
    FooterColor = clWindow
    FooterFont.Charset = DEFAULT_CHARSET
    FooterFont.Color = clWindowText
    FooterFont.Height = -11
    FooterFont.Name = 'MS Sans Serif'
    FooterFont.Style = []
    Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgMultiSelect]
    RowDetailPanel.Color = clBtnFace
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'MS Sans Serif'
    TitleFont.Style = []
    object RowDetailData: TRowDetailPanelControlEh
    end
  end
  object DspGetDoct: TDataSetProvider
    DataSet = adqGetDoct
    Left = 176
    Top = 168
  end
  object adqGetDoct: TADOQuery
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=sql;Persist Security Info=True;User' +
      ' ID=sa;Initial Catalog=kmetyy_his_zy;Data Source=192.168.1.216\S' +
      'QL2008R2'
    CursorType = ctStatic
    LockType = ltBatchOptimistic
    Parameters = <>
    SQL.Strings = (
      'select *'
      'from dbo.dic_doctor(nolock)'
      'order by doctsn')
    Left = 105
    Top = 167
    object adqGetDoctdoctsn: TStringField
      FieldName = 'doctsn'
      Size = 10
    end
    object adqGetDoctqualify_rp: TBooleanField
      FieldName = 'qualify_rp'
    end
    object adqGetDoctqualify_ether: TBooleanField
      FieldName = 'qualify_ether'
    end
    object adqGetDoctname: TStringField
      FieldKind = fkLookup
      FieldName = 'name'
      LookupDataSet = adqGetEmployee
      LookupKeyFields = 'emp_sn'
      LookupResultField = 'name'
      KeyFields = 'doctsn'
      Size = 50
      Lookup = True
    end
  end
  object CdsGetDoct: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'DspGetDoct'
    Left = 256
    Top = 168
    object CdsGetDoctdoctsn: TStringField
      FieldName = 'doctsn'
      Size = 10
    end
    object CdsGetDoctqualify_rp: TBooleanField
      FieldName = 'qualify_rp'
    end
    object CdsGetDoctqualify_ether: TBooleanField
      FieldName = 'qualify_ether'
    end
    object CdsGetDoctname: TStringField
      FieldName = 'name'
      ReadOnly = True
      Size = 50
    end
  end
  object dtsGetDoct: TDataSource
    DataSet = CdsGetDoct
    Left = 331
    Top = 169
  end
  object adqGetEmployee: TADOQuery
    Active = True
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=sql;Persist Security Info=True;User' +
      ' ID=sa;Initial Catalog=kmetyy_his_zy;Data Source=192.168.1.216\S' +
      'QL2008R2'
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT a.emp_sn'
      '       , a.name'
      '       , a.py_code'
      '       , a.wb_code'
      '       , a.c_code'
      '       , d.name AS prim_dept_name'
      '       , c.name AS sec_dept_name'
      '       , b.name AS title_name'
      '       , e.name as mz_clinic_name'
      'FROM dbo.dic_employee a(nolock)'
      'LEFT  JOIN dbo.dic_emp_title b(nolock)'
      '  ON a.title_code = b.code'
      'LEFT  JOIN dbo.dic_dept_code c(nolock)'
      '  ON a.sec_dept_sn = c.dept_sn'
      'LEFT  JOIN dbo.dic_dept_code d(nolock)'
      '  ON a.prim_dept_sn = d.dept_sn'
      'left join dbo.dic_emp_mz_clinic_responce e(nolock)'
      '  on a.mz_clinic_responce = e.code')
    Left = 113
    Top = 265
  end
end
